<template>
  <van-popup
    class="g-popup"
    v-bind="$attrs"
    closeable
    round
    position="bottom"
    :style="{height: '50%'}"
    v-on="$listeners"
  >
    <div class="g-popup__header">{{ title }}</div>
    <div class="g-popup__body">
      <slot />
    </div>
  </van-popup>
</template>

<script>
import { Popup } from 'vant'
export default {
  components: {
    [Popup.name]: Popup
  },
  props: {
    title: {
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="less">
.g-popup {
  .van-popup__close-icon {
    font-size: 54px;
    top: 40px;
    right: 40px;
  }
  &__header {
    height: 54px;
    padding: 40px;
    font-size: 40px;
    font-family: @font-medium;
    font-weight: 500;
    color: #222222;
    line-height: 54px;
  }
}
</style>
